<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>熊猫优选购物车</title>
    <link rel="stylesheet" href="../css/reset.css">
    <link rel="stylesheet" href="../sass/carsList.css">
</head>

<body>
    <div id="container">
        <div class="header">
            <div class="herder_logo">
                <a href="#">
                    <img src="../static/images/logo.png" alt="">
                    <div class="logoFont">
                        <p>熊猫优选</p>
                        <span>XIONG MAO YOU XUAN</span>
                    </div>
                </a>
            </div>
            <div class="header_user">
                <script id="user" type="text/html">
                    <img src="{{user.resultInfo.headerimg}}" class="userPic" width="60px" height="60px">
                    <span class="username">{{user.resultInfo.nick}}</span>
                    <input type="button" value="退出登录" id="exetUser">
                </script>
            </div>
        </div>
        <div class="book-list">
            <table>

            </table>
            <button type="button" id="delChecked">删除选中商品</button>
            <div class="footer">
                <div class="settleAccounts">结算选中商品</div>
                <h2>商品总价: <span id="totalPrice">￥0</span></h2>
            </div>
        </div>

    </div>
    <script src="../js/jquery-3.6.0.js"></script>
    <script src="../js/template-web.js"></script>
    <script id="showcarsList" type="text/html">
        <tr class="showcarsList_header">
            <td><input type="checkbox" name="checkAll" {{stateAll ? 'checked' : ''}}></td>
            <td>商品图片</td>
            <td>商品信息</td>
            <td>原价</td>
            <td>券后价</td>
            <td>数量</td>
            <td>券后小计</td>
            <td>操作</td>
        </tr>
        {{each cars}}
        <tr class="allTr">
            <td><input type="checkbox" name="checkItem" {{$value.state ? 'checked' : ''}}></td>
            <td index_id="{{$value.id}}"><img src="{{$value.image}}" alt="shop03" width='80' height='80'></td>
            <td width="400px">
                <p name="title">{{$value.title}}</p>
            </td>
            <td class="originPrice">￥{{$value.originPrice}}</td>
            <td class="price">￥{{$value.price}}</td>
            <td>
                <input type="button" name="minus" value="-" {{$value.num <=1? 'disabled' : ''}}>
                <input type="text" name="amount" value="{{$value.num}}">
                <input type="button" name="plus" value="+">
            </td>
            <td class="singlePrice" width=100>￥{{$value.singlePrice}}</td>
            <td><a href="#" class="collect">移入收藏</a><br><a href="#" class="delete">删除</a></td>
        </tr>
        {{/each}}
    </script>
    <script src="../js/template-web.js"></script>
    <script src="../js/carsList.js"></script>
</body>

</html>